Change extern to a bool from typing.Union[bool, str]#157
Open
HaydenMichel8 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently Function and Variable have type hinting for extern ->
extern: typing.Union[bool, str] = FalseI propose changing this to just be
extern: boolIt seems like this was added so that if I do something like:
extern "C++" double pi;extern will hold"C++"instead of true. But, this behavior hasn't been implemented yet so it seems like extern should stay as just being a bool until it is.At parser.py:2710 it says
# TODO: store linkageso it seems clear to me that this behavior has not yet been implemented.I haven't been able to find any way that
externcould ever be astrand it is messing up my ty checks when I try to assign a boolean variable the result ofVariable.extern.